
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <link rel="stylesheet" type="text/css" href="css/onlinebooking.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/datepicker.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/weimob-ui-1-1.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/common.css" media="all" />
<script type="text/javascript" src="src/jQuery.js"></script>
<script type="text/javascript" src="src/jquery-ui.js"></script>
<title>健康人生</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
        <meta name="Keywords" content="微盟、微信营销、微信代运营、微信定制开发、微信托管、微网站、微商城、微营销" />
        <meta name="Description" content="微盟，国内最大的微信公众智能服务平台，微盟八大微体系：微菜单、微官网、微会员、微活动、微商城、微推送、微服务、微统计，企业微营销必备。" />
        <!-- Mobile Devices Support @begin -->
            <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
            <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
            <meta content="no-cache" http-equiv="pragma">
            <meta content="0" http-equiv="expires">
            <meta content="telephone=no, address=no" name="format-detection">
            <meta content="width=device-width, initial-scale=1.0" name="viewport">
            <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
            <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
        <!-- Mobile Devices Support @end -->
        <link rel="shortcut icon" href="img/favicon.ico" />
        <style>
            img{width:100%!important;}
        </style>
    </head>
    <body onselectstart="return true;" ondragstart="return false;">
        <body id="onlinebooking">
	<div class="qiandaobanner"> 
		<img src="img/head_pic.jpg">
	</div>
	<div class="cardexplain">
	<!--普通用户登录时显示-->
	<ul class="round">
		<li>
			<a href="dingdan.html"  ><span>我的订单<em class="ok">1</em></span></a>
		</li>
	</ul>
	<!--后台可控制是否显示-->
	<ul class="round">
		<li>
		<h2>订单说明</h2>
		<div class="text">小包间</div>
		</li>
	</ul>

	<!--后台可控制是否显示-->
	<ul class="round">
		<li class="addr"><a href="http://api.map.baidu.com/marker?location=39.897445,116.331398&title=健康人生&name=健康人生&content=小包间&output=html&src=weiba|weiweb"><span>地址： 北京市丰台区马连道北路</span></a></li>
		<li class="tel"><a href="tel:010-88889999"><span>订单电话： 010-88889999</span></a></li>
	</ul>

	<ul class="round roundyellow" style="display:none;">
		<li class="userinfo"><a href="dingdan"><span>请完善个人资料再填表单</span></a></li>
	</ul>

	<!--粉丝填写过的信息的，直接就显示名字电话，粉丝没有填写过信息的话，这里就直接留空让粉丝填写-->
	<ul class="round">
		<form action="javascript:;" method="post">
		<li class="title mb"><span class="none">请认真填写表单</span></li>
				<li class="nob">
			<input name="formhash" id="formhash" value="2be3071a" type="hidden">
			<table class="kuang" border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<th>联系人</th>
					<td><input name="truename" class="px" id="truename" value="小城" placeholder="请输入您的真实姓名" type="text"></td>
				</tr>
			</table>
		</li>
						<li class="nob">
			<table class="kuang" border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<th>联系电话</th>
					<td><input name="tel" class="px" id="tel" value="13760986541" placeholder="请输入您的电话" type="tel"></td>
				</tr>
			</table>
		</li>
						<li class="nob">
			<table class="kuang" border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<th>预约日期</th>
				<td>
					<input type="text" class="px" name="dateline" id="dateline" readonly="readonly" />
				</td>
				</tr>
			</table>
		</li>
						<li class="nob">
			<table class="kuang" border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<th>预约时间</th>
				<td>
					<select name="timepart" id="timepart" class="dropdown-select">
									<option value="0:00-1:00" selected>0:00-1:00</option><option value="1:00-2:00">1:00-2:00</option><option value="2:00-3:00">2:00-3:00</option><option value="3:00-4:00">3:00-4:00</option><option value="4:00-5:00">4:00-5:00</option><option value="5:00-6:00">5:00-6:00</option><option value="6:00-7:00">6:00-7:00</option><option value="7:00-8:00">7:00-8:00</option><option value="8:00-9:00">8:00-9:00</option><option value="9:00-10:00">9:00-10:00</option><option value="10:00-11:00">10:00-11:00</option><option value="11:00-12:00">11:00-12:00</option><option value="12:00-13:00">12:00-13:00</option><option value="13:00-14:00">13:00-14:00</option><option value="14:00-15:00">14:00-15:00</option><option value="15:00-16:00">15:00-16:00</option><option value="16:00-17:00">16:00-17:00</option><option value="17:00-18:00">17:00-18:00</option><option value="18:00-19:00">18:00-19:00</option><option value="19:00-20:00">19:00-20:00</option><option value="20:00-21:00">20:00-21:00</option><option value="21:00-22:00">21:00-22:00</option><option value="22:00-23:00">22:00-23:00</option><option value="23:00-24:00">23:00-24:00</option>					</select>
				</td>
				</tr>
			</table>
		</li>
		
		
		
		<li class="nob">
			<table class="kuang" border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<th class="thtop" valign="top">备注</th>
					<td>
						<textarea name="info" class="pxtextarea" style=" height:99px;overflow-y:visible" id="info" placeholder="请输入备注信息"></textarea>
						<input type="hidden" name="uid" id="uid" value="ohwB7uJZFQxMxyUq1nIRylngcpK0" />
						<input type="hidden" name="rid" id="rid" value="3201" />
						<input type="hidden" name="aid" id="aid" value="28547" />
					</td>
				</tr>
			</table>
		</li>
		</form>
	</ul>
	<div class="footReturn">
		<input id="showcard" class="submit" value="提交消息" type="button" > 
		<div class="window" id="windowcenter">
			<div id="title" class="wtitle">操作提示<span class="close" id="alertclose"></span></div>
			<div class="content">
				<div id="txt"></div>
			</div>
		</div>
	</div>
	</div>


<script type="text/javascript"> 

$(document).ready(function () {
		$( "#dateline" ).datepicker({
			minDate: new Date(),
			dateFormat: "yy-mm-dd"
		}).val((
				function(d){
					return [d.getFullYear(), d.getMonth()+1, d.getDate()].join("-");
				}
			)(new Date()));
	$("#showcard").click(function () {
		var ret_single = ret_download = tel_num = '';
		$(".single").each(function(i){
			var s_name = $(this).parent().siblings().text();
			var s_value = $(this).val();
			if('' != s_value) ret_single += '$'+s_name+'#'+s_value;
		});
	
		$(".download").each(function(i){
			var s_name = $(this).parent().siblings().text();
			var s_value = $(this).val();
			if('' != s_value) ret_download += '$'+s_name+'#'+s_value;
		});

		tel_num = $("#tel").val();
		if('undefined' !== typeof(tel_num)){
			if(tel_num ==''){alert('电话不能为空');return;} 
			if(tel_num.length < 11){alert('请输入正确的电话');return;} 
		}

		if($("#truename").val()==''){alert('名字不能为空');return;}
//		if($("#dateline").val()==''){alert('请选择时间');return;}
		var submitData = {
			wechatid: $("#uid").val(),
			rid: $("#rid").val(),
			aid: $("#aid").val(),
			contact: $("#truename").val(),
			dateline: $("#dateline").val(),
			timepart: $("#timepart").val(),
			remark: $("#info").val(),
			contacttel: $("#tel").val(),
			fieldsigle:ret_single,
			fielddownload:ret_download
		};
		if('fromUsername' == submitData.wechatid) submitData.wechatid = '';
		$.post('/Webreserve/SubmitBook', submitData,
			function(data) {
				if (0 == data.errno) {
					alert(data.msg);
					var count = $(".ok").text();
					count = 1+ parseInt(count);
					$(".ok").text(count);
					setTimeout(function(){
						jumpurl(data.url);
					},1500);
					return;
				} else {
					alert(data.msg);
				}
			},
		"json")

	}); 
}); 


$("#dateline").change(function () {
	var submitData = {
	wxname: "o5JGbjuFTr6lumWIyyW3yfP-G5m0",
	dateline: $("#dateline").val(),
	formhash: $("#formhash").val(),
	action: "getcount"
	};
}); 



$("#windowclosebutton").click(function () { 
$("#windowcenter").slideUp(500);

}); 
$("#alertclose").click(function () { 
$("#windowcenter").slideUp(500);

}); 
function jumpurl(url){
	window.location.href = url;
}
function alert(title){ 

$("#windowcenter").slideToggle("slow"); 
$("#txt").html(title);
//$("#windowcenter").hide("slow"); 
setTimeout('$("#windowcenter").slideUp(500)',4000);
} 

	        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        window.shareData = {  
            "imgUrl": "img/head_pic.jpg", 
            "timeLineLink": "http://www.weimob.com/webreserve/ReserveBook?rid=3201",
            "sendFriendLink": "http://www.weimob.com/webreserve/ReserveBook?rid=3201",
            "weiboLink": "http://www.weimob.com/webreserve/ReserveBook?rid=3201",
            "tTitle": "炳胜微订座欢迎您！",
            "tContent": "小包间",
            "fTitle": "炳胜微订座欢迎您！",
            "fContent": "小包间",
            "wContent": "小包间" 
        };
        // 发送给好友
        WeixinJSBridge.on('menu:share:appmessage', function (argv) {
            WeixinJSBridge.invoke('sendAppMessage', { 
                "img_url": window.shareData.imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": window.shareData.sendFriendLink,
                "desc": window.shareData.fContent,
                "title": window.shareData.fTitle
            }, function (res) {
                _report('send_msg', res.err_msg);
            })
        });

        // 分享到朋友圈
        WeixinJSBridge.on('menu:share:timeline', function (argv) {
            WeixinJSBridge.invoke('shareTimeline', {
                "img_url": window.shareData.imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": window.shareData.timeLineLink,
                "desc": window.shareData.tContent,
                "title": window.shareData.tTitle
            }, function (res) {
                _report('timeline', res.err_msg);
            });
        });

        // 分享到微博
        WeixinJSBridge.on('menu:share:weibo', function (argv) {
            WeixinJSBridge.invoke('shareWeibo', {
                "content": window.shareData.wContent,
                "url": window.shareData.weiboLink,
            }, function (res) {
                _report('weibo', res.err_msg);
            });
        });
        }, false)
</script> 
<footer style="text-align:center; color:#ffd800;margin-right:20px;margin-top:0px;"><a href="/weisite/home?pid=28547&bid=52528&wechatid=ohwB7uJZFQxMxyUq1nIRylngcpK0&wxref=mp.weixin.qq.com">©健康人生</a></footer>
</body>        		<div mark="stat_code" style="width:0px; height:0px; display:none;">
					</div>
	</body>
</html>